﻿using Abp.Domain.Entities;
using Batman.RefiningPharmacist.Services.Inputs;
using System;
using System.Collections.Generic;

namespace Batman.RefiningPharmacist.Domains
{
    /// <summary>
    /// 合成单  T: 聚合根
    /// </summary>
    public class Composite : Entity<int>
    {
        /// <summary>
        /// 标题名称
        /// </summary>
        public string CompositeName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateAt { get; set; }

        /// <summary>
        /// 删除标志
        /// </summary>
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 合成物清单
        /// </summary>
        public List<CompositeItem> CompositeItems { get; set; }

        /// <summary>
        /// 创建对象时，初始化字段
        /// </summary>
        /// <param name="createId"></param>
        public void InitOnCreate(string createId)
        {
            CreateBy = createId;
            CreateAt = DateTime.Now;
        }
    }
}
